package au.edu.utas.yu_qiao_group.luckyman.ui.raffleshome;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import au.edu.utas.yu_qiao_group.luckyman.db.raffles.RaffleDTO;
import au.edu.utas.yu_qiao_group.luckyman.ui.raffledetail.RaffleDetailViewModel;

public class SharedRaffleViewModel extends ViewModel {
  public static int EDIT_MODE_KEY = 1;
  public static int NEW_MODE_KEY = 0;

  private RaffleDetailViewModel selected = new RaffleDetailViewModel(new RaffleDTO());
  private int mMode = NEW_MODE_KEY;

  public void setMode(int mode) {
    mMode = mode;
  }
  public void setMode(int mode, RaffleDTO item) {
    mMode = mode;
    selected = new RaffleDetailViewModel(item);
  }

  public RaffleDetailViewModel getSelected() {
    return selected;
  }

  public int getMode() {
    return mMode;
  }
}
